;Assembler header file for ScrollList
;written by DefMod (Dec 31 2005) on Sat Dec 31 14:07:20 2005
;Tom Hughes, tom@compton.nu, 29 Mar 1999

        [       :LNOT: :DEF: ScrollList_Hdr
        GBLS    ScrollList_Hdr

        [       :LNOT: :DEF: Get_Types
        GBLS    Get_Types
        ]
        [       :LNOT: :DEF: Types_Hdr
Get_Types                       SETS    "GET oslib/Types.Hdr"
        |
Get_Types                       SETS    ""
        ]
        $Get_Types

        [       :LNOT: :DEF: Get_OS
        GBLS    Get_OS
        ]
        [       :LNOT: :DEF: OS_Hdr
Get_OS                          SETS    "GET oslib/OS.Hdr"
        |
Get_OS                          SETS    ""
        ]
        $Get_OS

        [       :LNOT: :DEF: Get_OSSpriteOp
        GBLS    Get_OSSpriteOp
        ]
        [       :LNOT: :DEF: OSSpriteOp_Hdr
Get_OSSpriteOp                  SETS    "GET oslib/OSSpriteOp.Hdr"
        |
Get_OSSpriteOp                  SETS    ""
        ]
        $Get_OSSpriteOp

        [       :LNOT: :DEF: Get_Wimp
        GBLS    Get_Wimp
        ]
        [       :LNOT: :DEF: Wimp_Hdr
Get_Wimp                        SETS    "GET oslib/Wimp.Hdr"
        |
Get_Wimp                        SETS    ""
        ]
        $Get_Wimp

        [       :LNOT: :DEF: Get_Toolbox
        GBLS    Get_Toolbox
        ]
        [       :LNOT: :DEF: Toolbox_Hdr
Get_Toolbox                     SETS    "GET oslib/Toolbox.Hdr"
        |
Get_Toolbox                     SETS    ""
        ]
        $Get_Toolbox

        [       :LNOT: :DEF: Get_Gadget
        GBLS    Get_Gadget
        ]
        [       :LNOT: :DEF: Gadget_Hdr
Get_Gadget                      SETS    "GET oslib/Gadget.Hdr"
        |
Get_Gadget                      SETS    ""
        ]
        $Get_Gadget

;Symbols for constants
Class_ScrollList                *       &401A
Action_ScrollListSelection      *       &140181
ScrollList_StateAllowMultipleSelections *       &1
ScrollList_AddItemSpriteInfo    *       &3
ScrollList_AddItemSpriteInfoShift *       0
ScrollList_AddItemSpriteInfoSystemSpriteName *       0
ScrollList_AddItemSpriteInfoUserSpriteName *       1
ScrollList_AddItemSpriteInfoUserSpritePointer *       2
ScrollList_AddItemPlotSpriteHalfSize *       &4
ScrollList_SelectItemUnique     *       &1
ScrollList_SetColourDesktop     *       &1

;Symbols for structure offsets and sizes
                                ^       0
ScrollList_Gadget_event         #       Int
ScrollList_Gadget_foreground    #       OS_Colour
ScrollList_Gadget_background    #       OS_Colour
ScrollList_Gadget               *       @

                                ^       0
ScrollList_Object               Gadget_Object_MEMBERS
ScrollList_Object_event         #       Int
ScrollList_Object_foreground    #       OS_Colour
ScrollList_Object_background    #       OS_Colour
ScrollList_Object               *       @

                                ^       0
ScrollList_Selection_flags      #       Bits
ScrollList_Selection_item       #       Int
ScrollList_Selection            *       @

                                ^       0
ScrollList_ActionSelection_flags #       Bits
ScrollList_ActionSelection_item #       Int
ScrollList_ActionSelection      *       @

                                ^       0
ScrollList_ActionSelectionBlock Toolbox_ActionHeader_MEMBERS
ScrollList_ActionSelectionBlock_objectflags #       Bits
ScrollList_ActionSelectionBlock_item #       Int
ScrollList_ActionSelectionBlock *       @

                                ^       0
                                #       Bits
ScrollList_State                *       @

                                ^       0
                                #       Bits
ScrollList_AddItemFlags         *       @

                                ^       0
                                #       Bits
ScrollList_SelectItemFlags      *       @

                                ^       0
                                #       Bits
ScrollList_SetColourFlags       *       @

                                ^       0
ScrollList_Colour_real          #       OS_Colour
                                ^       0
ScrollList_Colour_desktop       #       Wimp_Colour
ScrollList_Colour               *       @


;Symbols for SWI's and SWI reason codes
ScrollList_GetState             *       &401A
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401A
   ;  R3 = scroll_list (Toolbox_C)
   ;Exit
   ;  R0 = state (ScrollList_State)

ScrollList_SetState             *       &401B
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401B
   ;  R3 = scroll_list (Toolbox_C)
   ;  R4 = state (ScrollList_State)

ScrollList_AddItem              *       &401C
   ;Entry
   ;  R0 = flags (ScrollList_AddItemFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401C
   ;  R3 = scroll_list (Toolbox_C)
   ;  R4 -> text (String)
   ;  R5 -> area (OSSpriteOp_Area)
   ;  R6 = id (OSSpriteOp_ID)
   ;  R7 = index (Int)

ScrollList_DeleteItems          *       &401D
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401D
   ;  R3 = scroll_list (Toolbox_C)
   ;  R4 = start_index (Int)
   ;  R5 = end_index (Int)

ScrollList_SelectItem           *       &401E
   ;Entry
   ;  R0 = flags (ScrollList_SelectItemFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401E
   ;  R3 = scroll_list (Toolbox_C)
   ;  R4 = index (Int)

ScrollList_DeselectItem         *       &401F
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &401F
   ;  R3 = scroll_list (Toolbox_C)
   ;  R4 = index (Int)

ScrollList_GetSelected          *       &4020
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4020
   ;  R3 = scroll_list (Toolbox_C)
   ;  R4 = offset (Int)
   ;Exit
   ;  R0 = new_offset (Int)

ScrollList_MakeVisible          *       &4021
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4021
   ;  R3 = scroll_list (Toolbox_C)
   ;  R4 = index (Int)

ScrollList_SetColour            *       &4022
   ;Entry
   ;  R0 = flags (ScrollList_SetColourFlags)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4022
   ;  R3 = scroll_list (Toolbox_C)
   ;  R4 = foreground (ScrollList_Colour)
   ;  R5 = background (ScrollList_Colour)

ScrollList_GetColour            *       &4023
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4023
   ;  R3 = scroll_list (Toolbox_C)
   ;Exit
   ;  R0 = foreground (OS_Colour)
   ;  R1 = background (OS_Colour)

ScrollList_SetFont              *       &4024
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4024
   ;  R3 = scroll_list (Toolbox_C)
   ;  R4 -> font_name (String)
   ;  R5 = width (Int)
   ;  R6 = height (Int)

ScrollList_GetItemText          *       &4025
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4025
   ;  R3 = scroll_list (Toolbox_C)
   ;  R4 = buffer (pointer to String)
   ;  R5 = buffer_size (Int)
   ;  R6 = index (Int)
   ;Exit
   ;  R5 = size (Int)

ScrollList_CountItems           *       &4026
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4026
   ;  R3 = scroll_list (Toolbox_C)
   ;Exit
   ;  R0 = items (Int)

ScrollList_SetItemText          *       &4027
   ;Entry
   ;  R0 = flags (Bits)
   ;  R1 = window (Toolbox_O)
   ;  R2 = &4027
   ;  R3 = scroll_list (Toolbox_C)
   ;  R4 -> text (String)
   ;  R5 = index (Int)

        ]
        END
